Skip to content

Centralize publishing to publish-package action#498

Merged
Noah Clarke (noahwc) merged 6 commits into
masterfrom
unify-npm-deploy-action
May 20, 2026
Merged

Centralize publishing to publish-package action#498
Noah Clarke (noahwc) merged 6 commits into
masterfrom
unify-npm-deploy-action

Conversation

@noahwc

Copy link
Copy Markdown
Contributor

Description of the change

NPMJS only allows us to declare one trusted action for publishing

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

  • Jira issue number: (PUT IT HERE)
  • Process.st launch checklist: (PUT IT HERE)

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

Copilot AI review requested due to automatic review settings May 20, 2026 19:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes npm publishing into the existing publish-package.yml workflow so it can be reused as the single “trusted” publishing workflow (per npm’s trusted actions limitation), and updates the Mint Components release workflow to call into that centralized publisher.

Changes:

  • Add workflow_call support to publish-package.yml with new inputs and conditional version-bump behavior.
  • Update Mint Components release to split “versioning” from “publishing”, invoking the reusable publish workflow and gating docs deployment on publishing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/publish-package.yml Makes publishing workflow reusable via workflow_call, adds npm-tag input and conditional versioning steps.
.github/workflows/mint-components-release.yml Refactors workflow to create version PRs, conditionally publish via reusable workflow, and deploy docs only after publish.
Comments suppressed due to low confidence (1)

.github/workflows/publish-package.yml:68

  • The npmtag expression starts with inputs.npm-tag, so when this workflow is called via workflow_call the default npm-tag: latest will always win and the prerelease fallback (increment-type == 'prerelease' && 'next') will never be used. If you want prereleases to default to next, adjust the expression to treat an omitted/empty npm-tag differently (or change the input default) so prereleases can't be accidentally published to latest.
      - name: Generate Variables
        id: vars
        run: |
          echo "dir=packages/${{ inputs.package }}" >> ${GITHUB_OUTPUT}
          echo "npmtag=${{ inputs.npm-tag || (inputs.increment-type == 'prerelease' && 'next') || 'latest' }}" >> ${GITHUB_OUTPUT}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish-package.yml
Comment thread .github/workflows/mint-components-release.yml Outdated
Comment thread .github/workflows/publish-package.yml
@jayden-chan Jayden Chan (jayden-chan) changed the title Centralize publishing to publish-package aciton Centralize publishing to publish-package action May 20, 2026
Comment thread .github/workflows/publish-package.yml
Comment thread .github/workflows/publish-package.yml
Comment thread .github/workflows/publish-package.yml Outdated
Co-authored-by: Jayden Chan <32287958+jayden-chan@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 19:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/publish-package.yml Outdated
Comment thread .github/workflows/publish-package.yml Outdated
Comment thread .github/workflows/publish-package.yml
Copilot AI review requested due to automatic review settings May 20, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/publish-package.yml
Comment thread .github/workflows/publish-package.yml Outdated
- Pass inputs.package and inputs.npm-tag through env vars instead of
  direct ${{ }} interpolation in bash to prevent command injection
- Add npm-tag format validation (alphanumeric, hyphens, dots only)
  to prevent GITHUB_OUTPUT injection via newlines
Comment thread .github/workflows/publish-package.yml
workflow_call:
inputs:
package:
description: "The package to publish (must be one of: express-boilerplate, integration-boilerplate-node, logger, mint-components, program-boilerplate, program-test-suite, publish-helper)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to introduce an additional location that needs to be updated whenever we want to add a new package to the list of options.

@noahwc
Noah Clarke (noahwc) merged commit e22bed0 into master May 20, 2026
10 of 11 checks passed
@noahwc
Noah Clarke (noahwc) deleted the unify-npm-deploy-action branch May 20, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants